home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / TreeView / treething < prev    next >
Internet Message Format  |  1995-06-12  |  3KB

  1. From weiner@pts.mot.com Thu Mar 18 17:00 MST 1993
  2. Received: from motgate.mot.com by maine.et.byu.edu; Thu, 18 Mar 93 17:00:13 -0700
  3. Return-Path: <weiner@pts.mot.com>
  4. Received: from pobox.mot.com ([129.188.137.100]) by motgate.mot.com with SMTP (5.65c/IDA-1.4.4/MOT-2.13 for <yackd@maine.et.byu.edu>)
  5.           id AA23402; Thu, 18 Mar 1993 17:57:16 -0600
  6. Received: from pts.mot.com ([145.4.3.2]) by pobox.mot.com with SMTP (5.65c/IDA-1.4.4/MOT-2.12 for <yackd@maine.et.byu.edu>)
  7.           id AA13790; Thu, 18 Mar 1993 17:57:51 -0600
  8. Received: from info. ([145.4.25.12]) by pts.mot.com (4.1/SMI-4.1)
  9.     id AA18452; Thu, 18 Mar 93 18:53:25 EST
  10. Received: by info. (NX5.67c/NX3.0S)
  11.     id AA02300; Thu, 18 Mar 93 19:01:39 -0500
  12. Date: Thu, 18 Mar 93 19:01:39 -0500
  13. From: Bob Weiner <weiner@pts.mot.com>
  14. Message-Id: <9303190001.AA02300@info.>
  15. To: yackd@maine.et.byu.edu
  16. In-Reply-To: Don Yacktman's message of Thu, 18 Mar 93 16:34:14 -0700 <9303182334.AA29304@maine.et.byu.edu>
  17. Subject: Re: Anyone have a tree display class that can read a tree from a text file?
  18. Status: R
  19.  
  20.  
  21. > X-Delivered: at request of weiner on infocomm
  22. > Date: Thu, 18 Mar 93 16:34:14 -0700
  23. > From: yackd@maine.et.byu.edu (Don Yacktman)
  24. > > I guess if would be easy to write if I knew how to draw lines between buttons
  25. > > (nodes) to connect them but this will be my first NeXTSTEP program and I
  26. > > don't know how to do anything with DPS yet.
  27. > > Also, if it is so easy to do, it is surprising that no one else has an object
  28. > > to do this.
  29. > Good point...I think it would be easy though, so if you tell me what you
  30. > want, I bet I could whip something up quick and then put it on the net
  31. > as a GNU copylefted thing...
  32.  
  33. Great.  Here's what I would want.  The tree class could read in a tree from
  34. a file in textual form.  The first line is the name of the tree.
  35. In textual form, each node in the tree is given by its label, which can be
  36. any text, including spaces on a single line.  The node's position in the tree
  37. is given by its preceding indentation, normally using 3 spaces of indentation
  38. per level (the amount can be figured out by examining the first indented
  39. label and counting its spaces.  An example:
  40.  
  41. Tree Name
  42. Root
  43.    Node 1
  44.       Node 1.1
  45.          Node 1.1.1
  46.    Node 2 has this longer label.
  47.  
  48.  
  49. After the tree is read in, it is displayed within a new view.  Each node is
  50. created as a selectable button with the appropriate label and lines
  51. connecting it to its parent and children.  (Let's assume only one button can
  52. be selected at a time.)
  53.  
  54. When a button is selected, a string consisting of the tree name and the node
  55. selected is sent to an output stream.  (stdout is fine as a default.), e.g.
  56.  
  57.     Tree Name^^Node 1.1 
  58.  
  59. could be output with ^^ indicating separation of the two arguments.
  60.  
  61. That's it.  Then my other program takes this standard output and displays
  62. text associated with the selected node.
  63.  
  64.  
  65.